package ${pkgName };

import com.ld.dao.annotation.Annotation.TableName;

import java.util.Date;

import lombok.Data;

/**
*
* ${modelComments}(${tableName})
*
* @ClassName ${className}
<% if ( isNotEmpty(email) ) { %>
* @author <a href="mailto:${email}" target="_blank">${author!"无名氏"}</a>
<% } else { %>
* @author ${author!"无名氏"}
<% } %>
* @date ${nowTime}
*
*/
@TableName("${tableName}")
@Data
public class ${className} {
    private static final long serialVersionUID = ${serialID};

    <% //循环输出属性 %>
    <% for (fieldModel in fieldList) {
    // @表示直接引用java方法，注意和下一行的调用方式区分
    if ( isNotEmpty ( @fieldModel.getComments() ) ) {
        print("\t/*"+fieldModel.comments+"*/\r\n");
    //print("\t@Field(name = \""+fieldModel.comments+"\")\r\n");
    }
    // 数据库与field名称不一致时
    if ( fieldModel.columnName != fieldModel.fieldName ) {
    print("\t@ColumnName(\""+fieldModel.columnName+"\")\r\n");
    }
        print("\tprivate " + @fieldModel.getFieldType() + " " + @fieldModel.getFieldName() + ";\r\n");

    }
    %>
}
